﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/List2.Master" AutoEventWireup="true" CodeBehind="DepartmentInfo.aspx.cs" Inherits="Honestysoft.Baseframework.WebUI.SystemManage.Organization.DepartmentInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" type="text/javascript">
    function openDialog() {
        var obj = new Object();
        obj.name = "新增子部门";
        var url = '<%=Honestysoft.Baseframework.WebUI.Globals.Home %>' + 'SystemManage/Organization/Org_Department_Edit.aspx?FunctionID=<%=Request["FunctionID"]+"" %>&ParentID=<%=Request["ID"]+"" %>';
        var UrlTmp = escape(url);
        var retValue = window.showModalDialog('<%=Honestysoft.Baseframework.WebUI.Globals.Home %>Scripts/ShowDlg.aspx?url=' + UrlTmp, obj, 'scroll:0;status:0;help:1;resizable:0;dialogWidth:600px;dialogHeight:300px');
        if (typeof (retValue) != "undefined" && retValue != null && retValue) {
            //window.location.href = window.location.href;
            var id = retValue.split('|')[0];
            var text = retValue.split('|')[1];
            //var uri = "SystemManage/Organization/DepartmentInfo.aspx?ID=" + id;
            window.parent.addNode(id, text, '<%=((int)Honestysoft.Baseframework.Model.EnumItem.OuType.Department).ToString() %>');
        }
    }
    function openDialog2() {
        var obj = new Object();
        obj.name = "修改部门信息";
        var url = '<%=Honestysoft.Baseframework.WebUI.Globals.Home %>' + 'SystemManage/Organization/Org_Department_Edit.aspx?FunctionID=<%=Request["FunctionID"]+"" %>&ID=<%=Request["ID"]+"" %>';
        var UrlTmp = escape(url);
        var retValue = window.showModalDialog('<%=Honestysoft.Baseframework.WebUI.Globals.Home %>Scripts/ShowDlg.aspx?url=' + UrlTmp, obj, 'scroll:0;status:0;help:1;resizable:0;dialogWidth:600px;dialogHeight:300px');
        if (typeof (retValue) != "undefined" && retValue != null && retValue) {
            window.location.href = window.location.href;
            window.parent.editSelectedNode(retValue.split('|')[1]);
        }
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ul id="maintab" class="shadetabs">
        <li class="selected"><a href="#default" >部门详细信息</a></li>
        <li><a href="Org_Department_List.aspx?DepartmentID=<%=Request["ID"] %>&by=Department&FunctionID=<%=Request["FunctionID"] %>">子部门列表</a></li>
        <li><a href="Org_Employee_List.aspx?DepartmentID=<%=Request["ID"] %>&by=Department&FunctionID=<%=Request["FunctionID"] %>"  >部门人员列表</a></li>
    </ul>
	 <div id="ajaxcontentarea" class="contentstyle">
      <div class="button_area">
                <asp:Button runat="server" ID="btnNew" Text="新增子部门"  CssClass="btn_big_normal" onmouseover="this.className='btn_big_active'" onmouseout="this.className='btn_big_normal'" OnClientClick="openDialog();return false;" />               
                &nbsp;
                <asp:Button runat="server" ID="btnEdit" Text="修改"  CssClass="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'" OnClientClick="openDialog2();return false;" />               
                &nbsp;
                <asp:Button runat="server" ID="btnDelete" CssClass="btn_normal" 
                    onmouseover="this.className='btn_active'" 
                    onmouseout="this.className='btn_normal'" Height="20" Text="删除"  OnClientClick="return confirm('删除此部门节点将同时删除其下面的子部门，是否继续？');"
                    onclick="btnDelete_Click" />
                &nbsp;<asp:Button runat="server" ID="btnActive" CssClass="btn_normal" 
                    onmouseover="this.className='btn_active'" 
                    onmouseout="this.className='btn_normal'"  Height="20" Text="启用" 
                    onclick="btnActive_Click" />
                &nbsp;<asp:Button runat="server" ID="btnCancel" CssClass="btn_normal" 
                    onmouseover="this.className='btn_active'" 
                    onMouseOut="this.className='btn_normal'"  Height="20" Text="禁用" 
                    onclick="btnCancel_Click" />
            </div>
 <table cellpadding="0" width="94%" cellspacing="3" border="0" class="tInfo" >
		<tr>
			<td class="title3">部门编号</td>
			<td class="lableline"><%=_DeptCode %></td>
            <td class="title3">部门简称</td>
			<td class="lableline"><%=_DeptShortName %></td>
		</tr>
		<tr>
			
			<td class="title3">部门名称</td>
			<td colspan="3" class="lableline"><%=_DeptName %></td>
		</tr>
		<tr>
			<td class="title3">英文名</td>
			<td class="lableline"><%=_DeptEName %></td>
			<td class="title3">成立日期</td>
			<td class="lableline"><%=_EstaDate %></td>
		</tr>
		<tr>
            <td class="title3">是否有效</td>
			<td class="lableline"><%=_IsValid %></td>
			
			<td class="title3">序号</td>
			<td class="lableline"><%=_SortCode %></td>
		</tr>
		<tr>
			<td class="title3">职责范围</td>
			<td colspan="3" class="lableline"><%=_DeptDesc %></td>
		</tr>
    </table>
    </div>
</asp:Content>
